(DEFUN getxrefs (Caller CmdSet / )
  (IF dos_xreflist
    (PROGN
      (SETQ xrlst (DOS_XREFLIST))
      (setq thisdwgxrefs
	       (SUBSTR
		 (eval
		   (cons 'Strcat
			 (mapcar '(lambda (x) (strcat ", " x))
				 xrlst
			 ) ;_ end of mapcar
		   ) ;_ end of cons
		 ) ;_ end of eval
		 3
	       ) ;_ end of SUBSTR
      ) ;_ end of setq
      (IF (WCMATCH thisdwgxrefs "*`,*")
        (SETQ thisdwgxrefs (STRCAT "XREFs: " thisdwgxrefs))
        (SETQ thisdwgxrefs (STRCAT "XREF: " thisdwgxrefs))
      )
    ) ;_ end of PROGN
    (PROGN
      (setq tblk (tblnext "block" t))
      (if (setq xrnm (cdr (assoc 1 tblk)))
        (progn
;;;          (if (wcmatch (strcase xrnm) "*.DWG")
;;;            (setq xrnm (substr xrnm 1 (- (strlen xrnm) 4)))
;;;          ) ;_ end of if
	    (if xrlst
	      (IF (and (eq(boole 1 (cdr(assoc 70 tblk))4)4)(NOT (MEMBER xrnm xrlst)))
	        (setq xrlst (append xrlst (list xrnm)))
	      ) ;_ end of IF
	      (setq xrlst (list xrnm))
            ) ;_ end of if
        ) ;_ end of progn
      ) ;_ end of if
      (while
	(setq tbln (tblnext "block"))
	 (if (setq xrnm (cdr (assoc 1 tbln)))
	   (progn
;;;            (if (wcmatch (strcase xrnm) "*.DWG")
;;;              (setq xrnm (substr xrnm 1 (- (strlen xrnm) 4)))
;;;            ) ;_ end of if
	     (if xrlst
	       (IF (and (eq(boole 1 (cdr(assoc 70 tbln))4)4)(NOT (MEMBER xrnm xrlst)))
		 (setq xrlst (append xrlst (list xrnm)))
	       ) ;_ end of IF
	       (setq xrlst (list xrnm))
	     ) ;_ end of if
	   ) ;_ end of progn
	 ) ;_ end of if
      ) ;_ end of while
    ) ;_ end of PROGN
  ) ;_ end of IF
)